package com.zeroup.auto.assists.step.dy;

import android.content.Intent;
import android.content.pm.PackageManager;

import androidx.annotation.NonNull;

import com.ven.assists.stepper.StepData;
import com.zeroup.auto.assists.DouYinBaseStep;
import com.zeroup.auto.utils.AssistsUtils;
import com.ven.assists.Assists;
import com.ven.assists.stepper.StepCollector;

public class StartStep extends DouYinBaseStep {




    @Override
    public void onImpl(@NonNull StepCollector stepCollector) {
        stepCollector.next(1,false,(i,c)->{
            // 获取PackageManager实例
            PackageManager packageManager = Assists.getService().getPackageManager();

            // 创建一个Intent，用于启动应用
            Intent intent = packageManager.getLaunchIntentForPackage(packageName);
            assert Assists.getService() != null;
            Assists.getService().startActivity(intent);
            System.out.println("-----------qd--------------");
            return AssistsUtils.nextStep(i.getData());
        });
    }
}
